package com.xiyou.luckdraw.api.dto.user;

import com.xiyou.luckdraw.common.constants.ResultCodeConstants;
import com.xiyou.luckdraw.common.exception.ValidateException;
import com.xiyou.luckdraw.common.result.AbstractRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * @ClassName: UpdateUserInfoRequest
 * @Description:
 * @author: limingxing
 * @Date: 2019-10-14 16:41
 */
@Data
@ApiModel(value = "更新用户信息")
public class UpdateUserInfoRequest extends AbstractRequest {
//    @ApiModelProperty(value="用户Id")
    private Long userId;
    private Integer enabled;

    @Override
    public void requestCheck() {
        if(null == userId || null == enabled){
            throw new ValidateException(
                    ResultCodeConstants.REQUISITE_PARAMETER_NOT_EXIST.getCode(),
                    ResultCodeConstants.REQUISITE_PARAMETER_NOT_EXIST.getMessage());
        }

    }
}
